package cn.itcast.java;

public class IfDemo01 {
    public static void main(String[] args) {
        int time = 5;
        /*if (time >= 0 && time <= 8) {
            System.out.println("早上好");
        }else{
            System.out.println("中午好或晚上好");
        }*/

        // python elif
        if (time >= 0 && time <= 8) {
            System.out.println("早上好");
        } else if (time > 8 && time <= 12) {
            System.out.println("上午好");
        } else if (time > 12 && time <= 18) {
            System.out.println("下午好");
        } else {
            System.out.println("晚上好");
        }
    }
}